package com.terren.spider.run;

import java.util.ArrayList;
import java.util.List;

import com.terren.spider.entity.core.Entry;
import com.terren.spider.run.basic.BasicSpiderRunner;

public class SpiderEntryGroupRunner<T> extends BasicSpiderRunner<T> {

	protected Integer groupId;

	public SpiderEntryGroupRunner(Integer groupId) {
		super();
		this.groupId = groupId;
	}

	public Integer getGroupId() {
		return groupId;
	}

	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}

	@Override
	public List<Entry> getEntrys() {
		List<Entry> entries = new ArrayList<>();
		try {
			entries = entryService.getEntryByGroupId(groupId);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return entries;
	}
}
